<template>
  <div style="    margin-right: 5px;">
    <!-- 此处插入直播代码，此处占位使用 -->
    <video :style="{ width: '690px', height: '440px' }" id="video-webrtc"  controls class="mt20">
    </video>
  </div>
</template>
  
<script lang="ts" setup>
import { onMounted, reactive, ref, inject } from 'vue'
import { CURRENT_CONFIG as config } from '@/api/http/config'
import { changeLivestreamLens, getLiveCapacity, setLivestreamQuality, startLivestream, stopLivestream } from '@/api/manage'
import jswebrtc from '@/vendors/jswebrtc.min.js'
import { ElMessage } from 'element-plus'
const nonSwitchable = 'normal'
const videoId = ref()
interface SelectData{
  droneSelected: any, //设备
  cameraSelected:any, // 镜头
  clarityList:any, // 清晰度
  go:boolean

}
interface MyProps {
  indexNum: number;
}
const props = defineProps<MyProps>()//父视图传来的模块id
const videoData:SelectData[] |any = inject("videoData");//父视图传来的直播相关信息

onMounted(() => {
  console.log(props.indexNum);
  console.log(videoData.value);
})

const onStart = async () => {
  // 此处直播开始逻辑
}
const onStop = async () => {
  // 此处直播结束逻辑
}

defineExpose({
	onStop ,
  onStart
})

</script>
  
<style lang="scss" scoped>
@import '../../style/living.scss';
</style>
  